//
//  NewVersionUtil.swift
//  ANOA
//
//  Created by 邱仙凯 on 2023/9/21.
//  Copyright © 2023 zwb. All rights reserved.
//

import UIKit

let tipCancelA = "      1、提交注销后有7天犹豫期，犹豫期不支持跳过\n      2、注销账号仅支持本人操作，账号一旦注销成功后不支持恢复，请谨慎操作\n      3、犹豫期内会有客服人员致电您确认注销，请留意电话"
class CancelAccountVC: GlobalFormVC {
    var itemTip:KSFormHItem = {
        let appe = KSFormHAppear()
            .tipStr(tipCancelA)
            .contentHight(140)
            .roundType(.all)
        let v = KSFormHItem(title: "",appearance:appe,type:.tempTip )
        v.setLineHidden(true)
        return v
    }()
    var item3 :KSFormHItem = {
        let appe = KSFormHAppear()
            .roundType(.all)
            .autoArrow(false)
            .tipStr("确认注销",tipFont: UIFont.systemFont(ofSize: 17),tipAligment: .center)
        let v = KSFormHItem(title: "",appearance:appe,type: .tempTip )
        v.setLineHidden(true)
        return v
    }()
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "注销账号"
        self.configView()
        self.configAction()
        
        
    }
    func configView() {
        
        bg.add(itemTip).addSection( titlex: "")
            .addSection( titlex: "").add(item3)
        
    }
    func configAction() {
        item3.actionClosure = {
            
            alertUtil(self, title: "确认注销", operateS: [nameAction(name: "确认", action: { _ in
                
                DeveloperTool.shared.SetCancelAccount("1")
                self.navigationController?.popViewController(animated: true)
            })])
        }
    }
}
